package com.itheima.dao;

import com.itheima.model.User;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

@Repository
public class Userdao {
    public List<User> findAll(){
        return createUsers();
    }
    private List<User> createUsers(){
        List<User> users = new ArrayList<>();
        User user =new User();
        user.setName("tom");
        user.setSex("m");
        user.setAge(20);
        users.add(user);
        return users;
    }
}
